//
//  EP_Tests.m
//  EP_Tests
//
//  Created by HCreater on 2018/9/27.
//  Copyright © 2018年 HCreater. All rights reserved.
//

//___FILEHEADER___

#import <XCTest/XCTest.h>
#import <OCMock/OCMock.h>
#import "MyTestClass.h"

@interface EP_Tests : XCTestCase

@end

@implementation EP_Tests

- (void)setUp {
    [super setUp];
    // Put setup code here. This method is called before the invocation of each test method in the class.
}

- (void)tearDown {
    // Put teardown code here. This method is called after the invocation of each test method in the class.
    [super tearDown];
}

- (void)testExample {
    // This is an example of a functional test case.
    // Use XCTAssert and related functions to verify your tests produce the correct results.
    
    id mockClass = [OCMockObject mockForClass:[MyTestClass class]];
    
    //有参数的方法
    OCMStub([mockClass cal:[OCMArg any]]).andReturn(@2);
    
    NSNumber* mockRet = [mockClass cal:@11];
    NSLog(@"MOCK Ret - %d", [mockRet integerValue]);
    
    [mockClass stopMocking];
}

- (void)testPerformanceExample {
    // This is an example of a performance test case.
    [self measureBlock:^{
        // Put the code you want to measure the time of here.
    }];
}

@end

